<?php

// 引入配置
// include_once
// include
include_once 'Db.php';

// 实例化
$db = new DB_API($config);

$where['id'] = $_POST['id'];

// 数据
$insertData = array(
    "name" => $_POST['name'],
    "color" => $_POST['color'],
    "content" => $_POST['content'],
    "time" => date("Y-m-d H:i:s")
);

// 执行
$updateSQL = $db->update('wish', $where, $insertData);

header("Location: index.php");
